<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2017/7/20
 * Time: 22:53
 */
namespace App\Http\Middleware;
use Closure;
use Auth;
class AuthToken
{
    public function handle($request, Closure $next)
    {
        if(Auth::check()){
            return $next($request);
        }else{
            $res = [
                'status'=>2,
                'description'=>'您没有权限'
            ];
            echo json_encode( $res );
//            abort(401);
        }
    }
}